package com.snailframework.gateway.error;

import com.snailframework.starter.commons.error.IErrorCode;
import lombok.Getter;


/**
 * @author wuyu
 * @Date: 2023/3/15 下午3:32
 */

@Getter
public enum GatewayErrorCodeEnum implements IErrorCode {
    ENUM_NOT_EXIST(1, "enum is not exist"),
    ILLEGAL_REQUEST(2, "Illegal request"),
    ;

    private final Integer code;

    private final String defaultMessage;

    GatewayErrorCodeEnum(Integer code, String defaultMessage){
        this.code = code;
        this.defaultMessage = defaultMessage;
    }

    @Override
    public Integer getCode() {
        return 90001000 + this.code;
    }


    @Override
    public String getBundleName() {
        return "gateway";
    }
}